In an optical network apparatus such as a gigabit-capable passive optical network (GPON) apparatus, one optical line terminal (OLT) central office device may be connected to one or more optical network devices applied to a user end, such as an optical network terminal (ONT) or an optical network unit (ONU). In a downstream direction, an OLT sends downlink information to all ONTs (or ONUs) connected to the OLT at a fixed downlink optical wavelength, and in an upstream direction, an ONT sends an uplink optical signal to the OLT in a specific timeslot according to a dynamic bandwidth allocation (DBA) scheduling mechanism of the OLT.
When an abnormality occurs in an optical network, for example, light emitting devices with a same wavelength are connected to an optical network line, or an ONT is faulty, causing abnormal light emitting, such an abnormality is referred to as a “rogue ONT” in the industry. Abnormal uplink light may occupy a light emitting timeslot of the ONT, thereby affecting normal communication between the ONT and the OLT, causing a bit error, and even making the ONT go offline. To avoid occurrence of a “rogue ONT”, an existing mechanism is that using media access control (MAC), an empty window with a bandwidth not less than that of an uplink frame is independently opened as a test window to detect an uplink optical signal, to locate the abnormality in the optical network. Therefore, not only a resource is wasted, but also test efficiency is low.